<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Emulateur PROCSI: Référence du fichier /Users/antoinelavail/Documents/workspace/emulateur-procsi-c/src/operateurs.c</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Emulateur PROCSI
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Projet d&#39;émulation d&#39;une architecture PROCSI</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Structures&#160;de&#160;données</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Variables&#160;globale</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Fonctions</a>  </div>
  <div class="headertitle">
<div class="title">Référence du fichier /Users/antoinelavail/Documents/workspace/emulateur-procsi-c/src/operateurs.c</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="fonctions_8h_source.html">fonctions.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Graphe des dépendances par inclusion de operateurs.c:</div>
<div class="dyncontent">
<div class="center"><img src="operateurs_8c__incl.png" border="0" usemap="#_2_users_2antoinelavail_2_documents_2workspace_2emulateur-procsi-c_2src_2operateurs_8c" alt=""/></div>
<map name="_2_users_2antoinelavail_2_documents_2workspace_2emulateur-procsi-c_2src_2operateurs_8c" id="_2_users_2antoinelavail_2_documents_2workspace_2emulateur-procsi-c_2src_2operateurs_8c">
<area shape="rect" href="fonctions_8h.html" title="fonctions.h" alt="" coords="360,84,461,111"/></map>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Fonctions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#a5325bc7f9174f0872485cde3999f38c0">add</a> (short *reg, short *memd, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#a58fa6b74b97de234c6883dadf28b3de0">SR</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#a67f196dd3656c5cbbe64452cca2873eb">sub</a> (short *reg, short *memd, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#a58fa6b74b97de234c6883dadf28b3de0">SR</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#a1c72b01e4b774b393955154c535df792">load</a> (short *reg, short *memd, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#ae9ded52abc61782c5d82b95b2801ced5">store</a> (short *reg, short *memd, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#ad4a547436e049812a3cb2acf6681ec87">push</a> (short *reg, short *memd, short *pilE, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#a3ee7622d5fd5bd07e98fa09d595db886">SP</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#a95c5f30e9a4f1d5b07108b1da2ac1ce6">pop</a> (short *reg, short *memd, short *pilE, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#ae0fe81a753b575de6aa60d6ee0ff872e">PC</a>, short *<a class="el" href="emulateur_p_r_o_c_s_i_8c.html#a3ee7622d5fd5bd07e98fa09d595db886">SP</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="operateurs_8c.html#a39a96e4bd19cf6e145f28d23b921e5de">codeToRegistre</a> (short code)</td></tr>
</table>
<hr/><h2>Documentation des fonctions</h2>
<a class="anchor" id="a5325bc7f9174f0872485cde3999f38c0"></a><!-- doxytag: member="operateurs.c::add" ref="a5325bc7f9174f0872485cde3999f38c0" args="(short *reg, short *memd, short *PC, short *SR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#a5325bc7f9174f0872485cde3999f38c0">add</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>SR</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction ADD : Ajoute au registre destination la valeur indiqu�e et stocke le r�sultat dans le registre destination.</p>
<p>Fonctionne dans quatre modes diff�rents :</p>
<ul>
<li>Registre-Registre</li>
<li>Registre-Imm�diat</li>
<li>Registre-Direct</li>
<li>Registre-Indirect Les modes Registre-Imm�diat et Registre-Direct peuvent contenir deux ou trois mots.</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + memd : r�f�rence � la m�moire de donn�es. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. + SR : r�f�rence au r�sultat de la derni�re op�ration de calcul </p>

</div>
</div>
<a class="anchor" id="a39a96e4bd19cf6e145f28d23b921e5de"></a><!-- doxytag: member="operateurs.c::codeToRegistre" ref="a39a96e4bd19cf6e145f28d23b921e5de" args="(short code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="operateurs_8c.html#a39a96e4bd19cf6e145f28d23b921e5de">codeToRegistre</a> </td>
          <td>(</td>
          <td class="paramtype">short&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1c72b01e4b774b393955154c535df792"></a><!-- doxytag: member="operateurs.c::load" ref="a1c72b01e4b774b393955154c535df792" args="(short *reg, short *memd, short *PC)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#a1c72b01e4b774b393955154c535df792">load</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction LOAD : Charge dans le registre destination la valeur indiqu�e.</p>
<p>Fonctionne dans trois modes diff�rents :</p>
<ul>
<li>Registre-Imm�diat</li>
<li>Registre-Direct</li>
<li>Registre-Indirect Les modes Registre-Imm�diat et Registre-Direct peuvent contenir deux ou trois mots.</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + memd : r�f�rence � la m�moire de donn�es. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. </p>

</div>
</div>
<a class="anchor" id="a95c5f30e9a4f1d5b07108b1da2ac1ce6"></a><!-- doxytag: member="operateurs.c::pop" ref="a95c5f30e9a4f1d5b07108b1da2ac1ce6" args="(short *reg, short *memd, short *pilE, short *PC, short *SP)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#a95c5f30e9a4f1d5b07108b1da2ac1ce6">pop</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>pilE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>SP</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction POP : D�pile une valeur de la pile pour la placer dans l'op�rande.</p>
<p>Remarque : La pile cro�t dans le sens des adresses d�croissantes.</p>
<p>Fonctionne dans trois modes diff�rents :</p>
<ul>
<li>Registre</li>
<li>Direct</li>
<li>Indirect</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + pilE : r�f�rence � la pile d'ex�cution. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. + SP : r�f�rence � l'adresse du sommet de la pile d'execution. </p>

</div>
</div>
<a class="anchor" id="ad4a547436e049812a3cb2acf6681ec87"></a><!-- doxytag: member="operateurs.c::push" ref="ad4a547436e049812a3cb2acf6681ec87" args="(short *reg, short *memd, short *pilE, short *PC, short *SP)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#ad4a547436e049812a3cb2acf6681ec87">push</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>pilE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>SP</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction PUSH : Empile la valeur de l'op�rande sur la pile d'execution.</p>
<p>Remarque : La pile cro�t dans le sens des adresses d�croissantes.</p>
<p>Fonctionne dans quatre modes diff�rents :</p>
<ul>
<li>Registre</li>
<li>Imm�diat</li>
<li>Direct</li>
<li>Indirect</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + pilE : r�f�rence � la pile d'ex�cution. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. + SP : r�f�rence � l'adresse du sommet de la pile d'execution. </p>

</div>
</div>
<a class="anchor" id="ae9ded52abc61782c5d82b95b2801ced5"></a><!-- doxytag: member="operateurs.c::store" ref="ae9ded52abc61782c5d82b95b2801ced5" args="(short *reg, short *memd, short *PC)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#ae9ded52abc61782c5d82b95b2801ced5">store</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction STORE : Sauvegarde dans la destination la valeur indiqu�e dans la source.</p>
<p>Fonctionne dans quatre modes diff�rents :</p>
<ul>
<li>Direct-Imm�diat</li>
<li>Direct-Registre</li>
<li>Indirect-Imm�diat</li>
<li>Indirect-Registre Les modes Direct-Registre et Indirect-Imm�diat peuvent contenir deux ou trois mots.</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + memd : r�f�rence � la m�moire de donn�es. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. </p>

</div>
</div>
<a class="anchor" id="a67f196dd3656c5cbbe64452cca2873eb"></a><!-- doxytag: member="operateurs.c::sub" ref="a67f196dd3656c5cbbe64452cca2873eb" args="(short *reg, short *memd, short *PC, short *SR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="operateurs_8c.html#a67f196dd3656c5cbbe64452cca2873eb">sub</a> </td>
          <td>(</td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>memd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short *&#160;</td>
          <td class="paramname"><em>SR</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fonction SUB : Soustrait au registre destination la valeur indiqu�e et stocke le r�sultat dans le registre destination.</p>
<p>Fonctionne dans quatre modes diff�rents :</p>
<ul>
<li>Registre-Registre</li>
<li>Registre-Imm�diat</li>
<li>Registre-Direct</li>
<li>Registre-Indirect Les modes Registre-Imm�diat et Registre-Direct peuvent contenir deux ou trois mots.</li>
</ul>
<p>Param�tres : + reg : r�f�rence au banc de registres. D�clar� et initialis� dans le main. + memd : r�f�rence � la m�moire de donn�es. D�clar� et initialis� dans le main. + PC : r�f�rence � l'adresse de l'instruction en cours d'execution. + SR : r�f�rence au r�sultat de la derni�re op�ration de calcul </p>

</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Structures de données</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Généré le Vendredi Janvier 6 2012 17:05:27 pour Emulateur PROCSI par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
